home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / PR / PSDRV06.ZIP / PSDRIVER.DOC < prev    next >
Encoding:
Text File  |  1994-06-04  |  12.0 KB  |  304 lines

  1.               ------------------------------------------
  2.               ASCII to POSTSCRIPT Translator Release 0.6
  3.                          by Johannes Geenen
  4.               ------------------------------------------
  5.  
  6. This is release 0.6 of my ASCII to Postscript translator driver
  7. PSDRIVER. It is a true DOS device driver that redirects output from a
  8. DOS printing device (LPTx) to a BIOS printer port and translates input
  9. into Postscript statements. PSDRIVER support a big subset of the IBM PC
  10. character set including national character sets and most IBM graphic
  11. characters. It support a subset of the EPSON FX printer code sequences,
  12. too.
  13.  
  14. PSDRIVER has a DOS command line interface to review installation status
  15. and change default behavior of PSDRIVER's output. This command line
  16. interface is bound together with the device driver to an .EXE file.
  17.  
  18. PSDRIVER was developed with Borland's TASM and C++ under DOS 6.2
  19. environment and tested under DOS 5.0, 6.0 and 6.2, Novell DOS 7.0 and
  20. the DOS shell of OS/2 2.1.
  21.  
  22. It allows output on network printers (tested with our BANYAN VINES 4.11
  23. and 5.53 LAN) and may be used under WINDOWS for output through the
  24. LPTx.DOS devices. I am using Mannesmann Tally MT906PS for testing, but
  25. PSDRIVER uses no printer specific Postscript extensions and should work
  26. on any Postscript printer.
  27.  
  28. PSDRIVER occupies less than 9k in memory.
  29.  
  30.  
  31. Installation
  32. ------------
  33.  
  34. Although PSDRIVER is named PSDRIVER.EXE, it is a true DOS device driver
  35. and has to be installed during boot procedure from the CONFIG.SYS file.
  36. To install PSDRIVER, simply add a line to your CONFIG.SYS file:
  37.  
  38.     DEVICE = <Your_Drive_And_Path>\PSDRIVER.EXE
  39.  
  40. where "<Your_Drive_And_Path>" is the location of PSDRIVER.EXE, i.e.
  41.  
  42.     DEVICE = C:\UTIL\STARTUP\PSDRIVER.EXE
  43.  
  44. PSDRIVER may be loaded high using the DEVICEHIGH statement instead of
  45. DEVICE.
  46.  
  47. On default, PSDRIVER hooks onto the LPT3 device and redirects output
  48. after translation to the first BIOS printer port. PSDRIVER assumes an A4
  49. page size (297*210mm) and will print in portrait orientation. Several
  50. command line options may be used during installation to change this
  51. default behavior:
  52.  
  53.       /D<device-name>   The default LPT3 may be changed using the /D
  54.                         switch to a different device. The device name
  55.                         is allowed to have at maximum 8 characters
  56.                         that will be converted to upper case letters.
  57.  
  58.       /P<printer-port>  Specify the desired printer port (1, 2, or 3
  59.                         are valid printer port IDs) for the trans-
  60.                         lated output.
  61.  
  62.       /S<page-size>     Specify one of the following digits:
  63.                           1 - Letter size
  64.                           2 - Legal size
  65.                           3 - A4 size (default)
  66.  
  67.       /O<page-orient>   Specify
  68.                           1   for portrait orientation
  69.                           2   for landscape orientation
  70.  
  71.       /L<left-margin>   Specify left margin in characters;
  72.                         current character density will be used
  73.  
  74.       /M<code>          Specify Multiplex interrupt 2Fh code that
  75.                         will be used by PSDRIVER command line
  76.                         (default EFh). Use a two character hex value.
  77.                         (See troubleshooting)
  78.  
  79. For example, if you are using letter size paper with your Postscript
  80. printer, the printer is attached to the third printer port (or a network
  81. redirector hooks redirects output to the second printer port to a
  82. network printer), and you want to use LPT2 for ASCII output on your
  83. Postscript printer, insert the following DEVICE statement into your
  84. CONFIG.SYS file:
  85.  
  86.       DEVICE=PSDRIVER.EXE /DLPT2 /P3 /S1
  87.  
  88. Option switches may be either in small or captial letters. Do not insert
  89. spaces between switch and value.
  90.  
  91.  
  92. Usage
  93. -----
  94.  
  95. PSDRIVER does not change the behavior of the original printer port
  96. (unless you map PSDRIVER onto the same device and printer port). Print
  97. your Postscript files to the original port, and your ASCII files to the
  98. re- directed port. PSDRIVER will do the rest:
  99.  
  100.    - On the device open call it sends the internal Postscript header
  101.      to the printer.
  102.  
  103.    - It captures each character, converts it to the equivalent character
  104.      of the postscript character set or issues Postscript procedure
  105.      calls to the printer.
  106.  
  107.    - On the device close call it performs a last showpage to eject the
  108.      last page and terminates the Postscript job.
  109.  
  110. When calling PSDRIVER from DOS command line, it will report the
  111. installation status of PSDRIVER.
  112.  
  113. You may use command line switches to change the default behavior of
  114. PSDRIVER for subsequent outputs. Try PSDRIVER /V for complete
  115. installation info or use one (ore more) of the following switches (do
  116. not add spaces between switch and parameter):
  117.  
  118.       /P<printer-port>  Specify the desired printer port (1, 2, or 3
  119.                         are valid printer port IDs) for the trans-
  120.                         lated output.
  121.  
  122.       /S<page-size>     Specify one of the following digits:
  123.                           1 - Letter size
  124.                           2 - Legal size
  125.                           3 - A4 size (default)
  126.  
  127.       /O<page-orient>   Specify
  128.                           1   for portrait orientation
  129.                           2   for landscape orientation
  130.  
  131.       /L<left-margin>   Specify left margin in characters;
  132.                         current character density will be used
  133.  
  134.       /M<code>          Specify Multiplex interrupt 2Fh code that
  135.                         will be used by PSDRIVER command line to
  136.                         retrieve data from installed PSDRIVER
  137.                         (default EFh). Use a two character hex value.
  138.                         Specify a value of ? to allow the PSDRIVER
  139.                         command line to search MUX codes between
  140.                         DBh and FFh.  (See troubleshooting)
  141.  
  142.  
  143. Supported Printer Control Codes
  144. -------------------------------
  145.  
  146. PSDRIVER supports a basic subset of the EPSON FX printer control code set.
  147. This allows you to change font sizes and styles, line density, page length,
  148. etc. This is a complete list of ESCAPE sequences and control characters
  149. supported by PSDRIVER:
  150.  
  151.         BS      08h     Backspace (go back one character cell)
  152.         HT      09h     Tab (fixed tabstops every 8th character cell)
  153.         LF      0ah     Line Feed (advance to next line)
  154.         FF      0ch     Form Feed (eject page)
  155.         CR      0dh     Carriage Return (go back to start of line)
  156.         SI      0fh     Set compressed character pitch (17cpi)
  157.         DC2     12h     Reset compressed character pitch
  158.  
  159.         ESC SI          Set compressed character pitch (17cpi)
  160.         ESC 0           Set line density: 8 lpi
  161.         ESC 2           Set line density: 6 lpi
  162.         ESC 4           Set italic font style
  163.         ESC 5           Reset italic font style
  164.         ESC E           Set bold font style
  165.         ESC F           Reset bold font style
  166.         ESC M           Set Elite character pitch (12cpi)
  167.         ESC P           Set Pica character pitch (10cpi)
  168.         ESC T           Set Super-/Subscript off
  169.  
  170.         ESC - <0>       Set Underline off
  171.         ESC - <1>       Set Underline on
  172.         ESC S <0>       Set subscript on
  173.         ESC S <1>       Set superscript on
  174.  
  175.         ESC 3 <v>       Set line density to <v>/180 inch
  176.         ESC A <v>       Set line density to <v>/60 inch
  177.         ESC C <v>       Set page length to <v> lines of current line density
  178.         ESC l <v>       Set left margin in current character density
  179.  
  180.  
  181. Troubleshooting
  182. ---------------
  183.  
  184. Some users reported problems with the command line interface of
  185. PSDRIVER: Calling PSDRIVER /v from DOS displays just garbage, not the
  186. true driver state. I think, interferences between PSDRIVER and other
  187. installed programs (i.e. the Netware shell or drivers) caused this
  188. problems. With version 0.6, I enhanced the communication interface to
  189. PSDRIVER.
  190.  
  191. If your PSDRIVER installation continues to malfunction under DOS,
  192. WINDOWS or OS/2 DOS-box please try out the following hints:
  193.  
  194. *  PSDRIVER is installed during CONFIG.SYS (you see the installation
  195.    message) but the DOS command PSDRIVER /v reports that PSDRIVER isn't
  196.    installed.
  197.  
  198.    May be, another resident program uses the same MUX-function as
  199.    PSDRIVER. On default, PSDRIVER answers on an interrupt call to the
  200.    multiplex interrupt 0x2f:
  201.  
  202.        mov    ah, 0efh
  203.        xor    al, al
  204.        int    02fh
  205.  
  206.    with the return values 'G' in register AH and 'N' in register AL. The
  207.    other resident program seems to intercept the EFh code, too and
  208.    responds in a different way.
  209.  
  210.    Modify PSDRIVER's MUX-code using the /M command line option. Specify
  211.    a different code as a two character hex value. Codes between 00 and
  212.    DA should be avoided because they are reserved by DOS.
  213.  
  214.    The command line version of PSDRIVER tries the EF code first. If you
  215.    have specified a different code on CONFIG.SYS command line, you have
  216.    to specify the same value on PSDRIVER's DOS interface, too. You may
  217.    use the query function of PSDRIVER's interface (specify /M?) to allow
  218.    PSDRIVEr to check all codes above DAh.
  219.  
  220. *  PSDRIVER reports garbage after issuing the PSDRIVER /v command.
  221.  
  222.    It seems that a program uses the same technique as PSDRIVER for
  223.    communication. (It uses the EF00 code and returns 'GN'). In this
  224.    case try a different MUX code on installation and command line
  225.    interface.
  226.  
  227.  
  228.  
  229.  
  230. History
  231. -------
  232.  
  233.     0.1   (Sep 09, 1993)    First release; bug free but with limited
  234.                             character set and without control code support
  235.  
  236.     0.2   (Oct 20, 1993)    Removed code overhead, added control code support
  237.  
  238.     0.3   (Jan 16, 1994)    Reduced font size to allow printing of 80
  239.                             characters on one line, enhanced subset of
  240.                             recognized characters; first version with
  241.                             .EXE layout
  242.  
  243.     0.4   (Feb 20, 1994)    Modified device driver interface, support of
  244.                             different page sizes and orientations; first
  245.                             implementation of DOS command line interface.
  246.  
  247.     0.5   (Apr 20, 1994)    Fixed bug: No longer resetting line density
  248.                             on start of a new page
  249.                 Fixed bug: Evaluation of multiple command
  250.                 line arguments
  251.                             Fixed bug: ESC-E starts bold printing and
  252.                             ESC-F stops it (thanks to Edward Skvorc).
  253.                             Added Feature: /L (set left margin)
  254.  
  255.     0.6   (Jun 05, 1994)    Modified communication interface between
  256.                             installed PSDRIVER and command line interface
  257.                             Added switch: /M (set MUX code);
  258.                             Added left margin escape code
  259.  
  260.  
  261. Known Problems
  262. --------------
  263.  
  264. The last page of output is ejected only, if the application closes the
  265. printer port on termination of the print job. If the application doesn't
  266. close the print device, the last page is lost forever... A programmable
  267. timer for PSDRIVER will fix this problem. The next release of PSDRIVER
  268. will have this feature.
  269.  
  270.  
  271.  
  272. Future Enhancements
  273. -------------------
  274.  
  275. The next release will add a user programmable interface to PSDRIVER.
  276. A windowed configuration and installation program for PSDRIVER is under 
  277. development.
  278.  
  279.  
  280.  
  281. The Author
  282. ----------
  283.  
  284. I'm network administrator of a Banyan Vines WAN in a german mobile phone
  285. company (Mannesmann Mobilfunk). I developed PSDRIVER to meet my personal
  286. requirements: printing source codes, E-Mail and ASCII reports. PSDRIVER
  287. is my first assembler program (and my first device driver implementation,
  288. too).
  289.  
  290. Please feel free to contact me if you have questions, bug reports or
  291. suggestions.
  292.  
  293. Send mail to
  294.  
  295.              Johannes Geenen
  296.              Schwannstr. 21
  297.              D-41460 Neuss
  298.              Germany
  299.  
  300. or contact me on Compuserve (ID 100137,3124).
  301.  
  302.  
  303.  
  304.